$OpenBSD: patch-common_charset_traits_h,v 1.2 2015/04/05 22:25:08 robert Exp $

On OpenBSD, _N is defined in ctype.h

--- common/charset/traits.h.orig	Thu Mar  5 16:54:04 2015
+++ common/charset/traits.h	Fri Apr  3 23:11:10 2015
@@ -102,31 +102,31 @@ class iconv_charset<const char*> { (public)
 	}
 };
 
-template <size_t _N>
-class iconv_charset<char [_N]> {
+template <size_t _ZCPN>
+class iconv_charset<char [_ZCPN]> {
 public:
 	static const char *name() {
 		return CHARSET_CHAR;	// Current locale
 	}
-	static const char *rawptr(const char (&from) [_N]) {
+	static const char *rawptr(const char (&from) [_ZCPN]) {
 		return from;
 	}
-	static size_t rawsize(const char (&) [_N]) {
-		return _N - 1;
+	static size_t rawsize(const char (&) [_ZCPN]) {
+		return _ZCPN - 1;
 	}
 };
 
-template <size_t _N>
-class iconv_charset<const char [_N]> {
+template <size_t _ZCPN>
+class iconv_charset<const char [_ZCPN]> {
 public:
 	static const char *name() {
 		return CHARSET_CHAR;	// Current locale
 	}
-	static const char *rawptr(const char (&from) [_N]) {
+	static const char *rawptr(const char (&from) [_ZCPN]) {
 		return from;
 	}
-	static size_t rawsize(const char (&) [_N]) {
-		return _N - 1;
+	static size_t rawsize(const char (&) [_ZCPN]) {
+		return _ZCPN - 1;
 	}
 };
 
@@ -174,31 +174,31 @@ class iconv_charset<const wchar_t*> { (public)
 	}
 };
 
-template <size_t _N>
-class iconv_charset<wchar_t [_N]> {
+template <size_t _ZCPN>
+class iconv_charset<wchar_t [_ZCPN]> {
 public:
 	static const char *name() {
 		return CHARSET_WCHAR;	// Current locale
 	}
-	static const char *rawptr(const wchar_t (&from) [_N]) {
+	static const char *rawptr(const wchar_t (&from) [_ZCPN]) {
 		return reinterpret_cast<const char*>(from);
 	}
-	static size_t rawsize(const wchar_t (&) [_N]) {
-		return (_N - 1) * sizeof(wchar_t);
+	static size_t rawsize(const wchar_t (&) [_ZCPN]) {
+		return (_ZCPN - 1) * sizeof(wchar_t);
 	}
 };
 
-template <size_t _N>
-class iconv_charset<const wchar_t [_N]> {
+template <size_t _ZCPN>
+class iconv_charset<const wchar_t [_ZCPN]> {
 public:
 	static const char *name() {
 		return CHARSET_WCHAR;	// Current locale
 	}
-	static const char *rawptr(const wchar_t (&from) [_N]) {
+	static const char *rawptr(const wchar_t (&from) [_ZCPN]) {
 		return reinterpret_cast<const char*>(from);
 	}
-	static size_t rawsize(const wchar_t (&) [_N]) {
-		return (_N - 1) * sizeof(wchar_t);
+	static size_t rawsize(const wchar_t (&) [_ZCPN]) {
+		return (_ZCPN - 1) * sizeof(wchar_t);
 	}
 };
 
